package com.beiming.libra.controller;

import com.beiming.libra.domain.SwaggerTest;
import com.beiming.libra.helper.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

/**
 * @author tp Date : 2018/5/30/030 10:56
 */
@RestController
@Api(value = "swagger api测试", tags = "swagger api测试")
@RequestMapping("/api/SwaggerTest")
public class SwaggerTestController {

  @GetMapping("/{id}")
  @ApiOperation(value = "获得一个SwaggerTest", notes = "获得一个SwaggerTest")
  public Result<SwaggerTest> getSwaggerTest(@PathVariable String id) {
    return Result.success(new SwaggerTest());
  }

  @DeleteMapping("/{id}")
  @ApiOperation(value = "删除一个SwaggerTest", notes = "删除一个SwaggerTest")
  public Result deleteSwaggerTest(@ApiParam("id中文") @PathVariable String id,
      @ApiParam("id中文2") @PathVariable String id2) {
    return Result.success("");
  }

  @PutMapping("/{id}")
  @ApiOperation(value = "修改一个SwaggerTest", notes = "修改一个SwaggerTest")
  public Result updateSwaggerTest(SwaggerTest swaggerTest) {
    return Result.success("");
  }

  @PostMapping("")
  @ApiOperation(value = "新增SwaggerTest", notes = "新增SwaggerTest")
  public Result saveSwaggerTest(SwaggerTest swaggerTest) {
    return Result.success("");
  }
}
